package com.xbongbong.pro.fundset.pojo.dto;

import com.xbongbong.paas.toolbox.wrap.BaseDTO;
import com.xbongbong.pro.fundset.pojo.FundSetPeriodFilterPojo;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @author zcp
 * @version v1.0
 * @since v1.0
 */
@Getter
@Setter
@ToString
public class FundSetPaymentSaveDTO extends BaseDTO {
    private static final long serialVersionUID = -5262132240371106205L;
    /**
     * 生成规则，默认值1：1手动创建应收，2按开票产生应收，3按出库产生应收
     */
//    @NotNull(message = "{dto.msg.fundSetPaymentSave.modelType.NotNull}")
    private Long modelType;
    /**
     * 管理方式，默认值1：1无账期，2企业统一管理账期，3根据客户管理账期，4根据合同订单管理账期
     */
    @NotNull(message = "{dto.msg.fundSetPaymentSave.manageType.NotNull}")
    private Integer manageType;
    /**
     * 账期规则，为空则等同于无账期
     * [{"formId":1,"attr":"text_6","attrName":"客户分级","rule":[{"key":"1","type":1,"month":1,"day":1}]}]
     */
    @Valid
    private List<FundSetPeriodFilterPojo> periodFilter;

    /**
     * 开启、关闭
     */
    private Integer enable;
}
